<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="http://localhost/e-shop/xiangqu/Application/Index/View/Orders/css/order.css"/>
		<script src="http://localhost/e-shop/xiangqu/Static/js/address.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://localhost/e-shop/xiangqu/Static/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var updateAdd = "<?php echo U('Index/Orders/updateAdd');?>"
		</script>
		<script src="http://localhost/e-shop/xiangqu/Application/Index/View/Orders/js/orders.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<script language="javascript">
		var s=["s1","s2","s3"];
		var opt0 = ["--省份--","--城市--","--地区--"];
		function setup(){
		 for(i=0;i<s.length-1;i++)
		  document.getElementById(s[i]).onclick=new Function("change("+(i+1)+")");
		 change(0);
		}
		window.onload=function(){
		setup()
			
		};
		$(function(){
			$('.dj').live('click',function(){
				var dj = $('#s1').val() + '省,' + $('#s2').val() + '市,' + $('#s3').val();
				alert(dj);	
			})
	})
</script>
<style type="text/css">
	.table_box table tr{
		text-align: center;
	}
</style>
	<body>
		<!--头部固定区-->
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!--头部固定区-->
<style type="text/css">
	#header .header_content .logined a{
		font: 400 14px/50px "微软雅黑";
	}
</style>
		<div id="header_fixed"></div>
		<div id="header">
			<div class="header_content">
				<div class="logo"><img src="http://localhost/e-shop/xiangqu/Application/Index/View/Orders/images/logo.png" alt="" /></div>
				<?php if(!isset($_SESSION['username'])): ?>
				<div class="login">
					<!--<a href=""><span></span></a>-->
					<a href="<?php echo U(('Index/Register/index'));?>">注册</a>
					<a href="<?php echo U(('Index/Login/index'));?>">登录</a>
				</div>
				<?php else:  ?>
				<!--已登录begin-->
				<div class="logined">
					<a href="<?php echo U('out');?>">退出</a>
					<a href="<?php echo U('Index/Orders/myOrder');?>">我的订单</a>
					<a href="<?php echo U('Index/Carts/index');?>">购物车</a>
					<a href="<?php echo U('Index/User/index');?>"><?php echo $_SESSION['nick'] ?></a>
					<a href="<?php echo U('Index/Orders/myOrder');?>" class="face"><img src="http://localhost/e-shop/xiangqu/<?php echo $face;?>" alt="" /></a>
				</div>
				<!--已登录end-->
				<?php endif  ?>
			</div>
		</div>
		<!--头部end-->
		<!--菜单栏begin-->
		<div id="nav">
			<div class="nav_content">
				<a href="<?php echo U('Index/Index/index');?>">首页</a>
				<?php foreach ($navData as $k=>$v){?>
				<a href="<?php echo U('Index/List/index',array('cid'=>$v[cid]));?>"><?php echo $v['cname'];?></a>
				<?php }?>
				<div class="search">
					<form action="<?php echo U('Index/Search/index');?>" method="get">
						<input type="text" class="text" name="keys" placeholder="搜索" />
						<input type="submit" class="sbt" value=""/>
					</form>
				</div>
			</div>
		</div>
		<!--菜单栏end-->
		<!--菜单栏end-->
		<form action="<?php echo U('Index/Orders/confirmOrder');?>" method="post">
		<!--页面主体区域begin-->
		<div id="container">
			<!--收货地址区块begin-->
			<div class="address">
				<h2>确认收货地址</h2>
				
				<div class="add_cont"     <?php if($addData['realname']!=''){ ?>style="display:none"<?php } ?> >
						<ul>
							<li>
								<span>所在地区：</span>
								<select id="s1" name="province" class="province">
									<option value="">--省份--</option>
								</select>
								<select id="s2" name="city" class="city">
									<option value="">--城市--</option>
								</select>
								<select id="s3" name="county" class='area'>
									<option value="">--地区--</option>
								</select>
							</li>
							<li>
								<span>详细地址：</span>
								<textarea name="address" class="add_infor" placeholder="详细信息" ></textarea>
							</li>
							<li>
								<span>收货人姓名：</span>
								<input type="text" name="consignee" class="name" />
							</li>
							<li>
								<span>手机号码：</span>
								<input type="" name="mobile" id="" value="" class="phone" />
							</li>
							<li>
								<a href="javascript:;"  class="save" />保存</a>
								
								<a href="javascript:;"  class="cancel"     <?php if($addData['realname'] ==''){ ?>style="display:none"<?php } ?> />取消</a>
							</li>
						</ul>
					<div class="birs"></div>
					<div class="bir"></div>
				</div>
				<!--确认地址块-->
				<div class="add_confirm"     <?php if($addData['realname']==''){ ?>style="display:none"<?php } ?> >
					<div class="add_confirm_c">
						<input type="hidden" name="consignee" value="<?php echo $addData['realname'];?>" />
						<input type="hidden" name="mobile" value="<?php echo $addData['phone'];?>" />
						<input type="hidden" name="address" value="<?php echo $addData['add'];?>"/>
						<span class='s_consignee'>收货人：<?php echo $addData['realname'];?></span><br />
						<span class='s_mobile'>手机号：<?php echo $addData['phone'];?></span><br />
						<span class='s_address'>收货地址：<?php echo $addData['add'];?></span>
						<div class="bg_birs"></div>
						<div class="bg_bir"></div>
						<span class="update_add">修改地址</span>
					</div>
				</div>
				<!--确认地址块end-->
			</div>
			<!--收货地址区块end-->
			<!--确认商品信息begin-->
			<div class="confirm">
				<h2>确认商品信息</h2>
				<div class="table_box">
					<table border="0">
						<thead>
							<tr>
								<td width="370px" style="text-align: center;">商品</td>
								<td width="150px">规格</td>
								<td width="150px">单价（元）</td>
								<td width="150px">数量</td>
								<td width="150px">实价</td>
							</tr>
						</thead>
						<tbody>
							<?php foreach ($confirmData as $k=>$v){?>

							<tr>
								<td>
									<a href="<?php echo U('Index/Product/index',array('gid'=>$v['id']));?>" class="a_img"><img src="http://localhost/e-shop/xiangqu/<?php echo $v['smallImg'];?>" alt="" /></a>
									<a href="<?php echo U('Index/Product/index',array('gid'=>$v['id']));?>"><?php echo $v['name'];?></a>
								</td>
								<td specId="<?php echo $v['specId'];?>">
									<?php foreach ($v['options'] as $kk=>$vv){?>
										<?php echo $kk;?>:<?php echo $vv;?><br/>
									<?php }?>
								</td>
								<td>￥<?php echo $v['price'];?></td>
								<td><?php echo $v['num'];?></td>
								<td>￥<?php echo $v['total'];?></td>
							</tr>
							<?php }?>
						</tbody>
					</table>
				</div>
			</div>
			<!--确认商品 信息end-->
			<!--总计部分begin-->
			<div class="total">
				<span class="t_bg"></span>
				<span class="liuyan">给卖家留言：
					<input type="text" name="remarks" style="font:400 16px/22px '微软雅黑'" />
				</span>
				<span class="g_sel">运费：￥<?php echo $postage;?></span>
				<span class="total_p">合计：<span class="s_price">¥<?php echo $totalPrice;?></span></span>
				<span class="total_p2">订单总总额：<span class="s_price">¥<?php echo $totalPrice;?></span></span>
			</div>
			<!--总计部分end-->
			<!--确认订单begin-->
			<div class="conf">
				<div class="pay">实付款：<span class='p'>￥<?php echo $totalPrice;?></span><div class="birs2"></div></div>
				<input type="submit" name="" class="pay_conf" value="确认订单" />
			</div>
			<!--确认订单end-->
			</form>
		</div>
		<!--页面主体区域end-->
		
		<!--页面底部begin-->
		<div id="footer">
			<div class="foot_wrap">
				<div class="say">
					<p class="p1">“如果你的东西和大家都一样，那干嘛还设计它？”</p>
					<p class="p2">by  Philippe Starck</p>
				</div>
				<div class="foot_logo"></div>
				<p class='infor'>Copyright 2015 版权所有 浙ICP备12027496 <a href="">热门精选</a> <a href="">热门分类</a></p>
				<p class='link'>商务合作  友情链接： 想去网  蘑菇街 360安全网址 爱图购</p>
			</div>
		</div>
		<!--页面底部end-->
	</body>
</html>
